This invention relates generally to embedded systems, and more particularly to debugging embedded systems. However, the invention can be applied to other computer systems as well.
Embedded systems are the most prevalent of all computer systems used today, accounting for the vast majority of microprocessors sold. Advances in processor technology and memory technology and their associated low cost allow them to be considered for a large number of applications. The size and sophistication of embedded applications has correspondingly grown.
Embedded systems share most of the following characteristics. They generally are developed around custom hardware, require high quality and reliability, and frequently deal with real-time issues. The applications running on these systems can be very large and complex. Examples of such systems include telecommunication switching systems, aircraft, spacecraft, and weapons systems, and a multitude of applications in the car and in the house. Other examples of embedded systems include cellular phones, set-top boxes, and personal-digital assistant (PDA) devices.
Because of their required reliable and often real-time nature, embedded systems generally require careful debugging to ensure that they work as intended. However, debugging embedded systems can be difficult. The advantages of embedded systemsxe2x80x94the variety in processors often found in them, their reliability, etc.xe2x80x94make for their debugging to be arduous. Within the prior art, development environmentsxe2x80x94which are the sets of software tools used by developers to develop embedded system applicationsxe2x80x94usually cater to only a small number of different processors. This means that a developer who is adept at using a given development environment may find him or herself having to use a different environment for projects that use chips not supported by the favored environment.
Furthermore, the development environments within the prior art are typically hard coded for a particular set of processors. This means that the extensibility of such environments is limited. It is difficult, for example, to extend the environments to support other processors, without having to re-code them. Moreover, it is difficult to extend the features supported by the environments. A given development environment, for example, may support certain debugging features which a developer may desire to use with another development environment. Within the prior art, however, this is difficult to accomplish.
Furthermore, existing universal debugging interfaces are limited. For example, the Universal Debugger Interface (DBI) known within the art is relative to a specific process, and thus is not general for over all processes. It does not include memory search and copy primitives as well, limiting its usefulness. For these and other reasons, therefore, there is a need for the present invention.
The invention relates to target control abstraction for debugging embedded systems, where the term xe2x80x9ctargetxe2x80x9d non-restrictively and in a non-limiting manner refers to hardware, such as a processor, that is part of an embedded system, and which is desired to be debugged. In one embodiment, there are two abstracted models for debugging an embedded system: an abstracted hardware model, and an abstracted hardware-via-software model. The hardware model includes a non-hardware-specific debugging interface, for communication between a debugger for the embedded system and the hardware of the embedded system. The hardware-via-software model includes a proxy to receive commands intended for the hardware of the embedded system from the debugger, and a component within a kernel of the embedded system to receive the commands and convey them to the hardware. However, in other embodiments of the invention, the component is not within the kernel, for example, and can be any type of software agent on the target.
Embodiments of the invention provide for advantages not found within the prior art. For example, the non-hardware-specific debugging interface allows for easy extensibility of the development environment. New processors can often be easily supported without re-coding of the entire development environment; rather, only a translation driver is typically necessary to parse the debugging interface to a particular new target (although in other embodiments, more components can be needed or changed than the driver). New functionality can also be easily integrated into the development environment without re-coding, via plug-ins that utilize the non-hardware-specific interface. Similarly, by using proxies and kernel components particular to a given target, the hardware-via-software model allows for easy extensibility since only a new proxy and kernel component usually need to be developed to support a new target.
Furthermore, as compared to the UDI universal debugger interface known within the art, embodiments of the invention are not relative to a specific process, and thus are generalized over all processes, making for a better debugger. In one embodiment, memory search and copy primitives are provided, providing a further advantage as compared to the UDI.